//
//  MXLauncher.m
//  iChatShortcut
//
//  Created by Meniny on 2017-05-16.
//  Copyright © 2017年 Meniny. All rights reserved.
//

#import "MXLauncher.h"

@implementation MXLauncher
+ (void)launchiChat {
    NSArray<NSRunningApplication *>* apps = [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.apple.iChat"];
    if (apps && apps.count) {
        [[apps firstObject] activateWithOptions:NSApplicationActivateIgnoringOtherApps];
    } else {
        [[NSWorkspace sharedWorkspace] launchApplication:@"/Applications/Messages.app"];
    }
}
@end
